package com.biz.service.basic;

import com.biz.model.Pmodel.PBaseUser;
import com.biz.model.Pmodel.SysUser;
import com.biz.model.Pmodel.User;
import com.biz.model.Pmodel.sys.Puser;
import com.biz.service.base.BaseServiceI;
import com.framework.model.Paging;
import com.framework.model.Params;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by yzljj on 2016/6/23.
 */
public interface UserServiceI extends BaseServiceI<User> {
    public User findByName(String username);

    List<Map> findRolesByUser(User user);

    List<Map> findNameSpaceRolesByUser(User user);

    public List<Map> findPermissionList(User user);

    Paging findAgentUserGrid(Params sqlParams) throws  Exception;

    String findIdentity_code(User user) throws Exception;

    User findUser(User user) throws Exception;

    User findUserByUserName(String userName) throws Exception;


    User getUserForLoginhashMap(HashMap<String, Object> hashMap) throws Exception;


    User getUserByCode(String user_code)throws Exception;


    boolean changePwd(String pwd, String userid)throws Exception;

    int findBaseUserisPeriodization(int identity, String identity_code) throws Exception;

    String findSidByCode(String identity_code)throws Exception;
    PBaseUser getBaseUserByOpen_id(String open_id) throws Exception;

    Map<String,Object> upDateAgentsByOpenId(String openId);
    Integer checkLoginName(String loginName) throws Exception;
    /**
     * 根据手机号获取用户对象
     * @param phone
     * @throws Exception
     */
    List<Puser> findPhone(String phone) throws Exception;
//获取用户所述商户品牌门店信息
    Map<String,String> getIdentityInfoByUser(SysUser user) throws  Exception;
}
